<template>
  <div class="gift">
    <my-head title="精美礼品" :go="true" :ri="false"></my-head>
    <div class="content">

      <div class="nav">
        <div class="item" v-for="(item,index) in data" :key="index" @click="tab(item.id)">
          <span :class="{active:active == item.id ? true :false}">
            {{item.msg}}
          </span>
        </div>
      </div>

      <div class="msg">
        <div class="null">
          <img src="@/assets/null.png" alt="">
          <p>暂无数据</p>
        </div>
      </div>

    </div>
  </div>
</template>

<script>
import Head from "@/components/Head"
export default {
  data(){
    return {
      active:1201,
      data:[
        {id:1201,msg:"全部"},
        {id:1202,msg:"待发货"},
        {id:1203,msg:"待收货"},
        {id:1204,msg:"已完成"},
      ]
    }
  },
  components:{
    myHead:Head
  },
  methods:{
    tab(id){
      this.active = id
    }
  }
}
</script>

<style scoped lang="less">
  .gift{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    .content{
      flex: 1;
      display: flex;
      flex-direction: column;
      .nav{
        display: flex;
        border-top: 0.01rem solid #f4f4f4;
        .item{
          flex: 1;
          text-align: center;
          padding: 0.1rem 0;
          span{
            font-size: 0.15rem;
            padding: 0.06rem 0;
          }
          .active{
            border-bottom: 0.02rem solid #fd8b3e;
          }
        }
      }
      .msg{
        flex: 1;
        .null{
          flex: 1;
          img{
            display: block;
            width: 2.34rem;
            margin: 0 auto;
            margin-top: 1rem;
          }
          p{
            text-align: center;
            color: #acacac;
            font-size: 0.13rem;
            padding: 0.13rem 0;
          }
        }
      }
    }
  }
</style>
